<!-- 已报名活动 -->
<template>
	<view class="container">
		<view class="c-cell" @click="toMineActiveDetail">
			<u-cell-group>
				<u-cell v-for="item in activeList" :key="item.id" :data-id="item.activity_id" icon="list-dot" :title="item.activity_title" label="点击查看活动详情" size="large"></u-cell>
			</u-cell-group>
		</view>
		<view class="c-empty" v-if="activeList.length==0">
			<u-empty icon="/static/empty/list.png" text="没有报名的活动" textSize="18" marginTop="25%" width="80%"></u-empty>
		</view>
	</view>
</template>

<script>
	export default {
		name:"",
		data() {
			return {
				// 活动报名列表
				activeList:[]
			}
		},
		onShow() {
			this.getActiveApplyList()
		},
		methods: {
			// 跳转活动详情
			toMineActiveDetail(e){
				if(e.target.dataset.id){
					
					this.navigateTo("./mineActiveDetail?id="+e.target.dataset.id)
				}
			},
			// 获取已报名活动列表
			getActiveApplyList(){
				this.$http.getActiveApplyList().then(res=>{
					this.activeList = res.data
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.container{

	}
</style>
